﻿<UserControl x:Class="LiveTiss.Guias.UserControls.IdentificacaoEquipeMembroEquipe"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    mc:Ignorable="d" x:Name="ucEquipe" Width="813" >

    <UserControl.Resources>
        <converter:EnumConverter x:Key="enumConverter"  />
        <converter:BoolToVisibilityConverter x:Key="visibilityConverter" />
    </UserControl.Resources>
    
    <StackPanel>
        <Grid Height="53" Margin="0,0,6,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Margin="0" Grid.Row="0" Grid.Column="1">
                <TextBlock TextWrapping="Wrap" Text="CPF" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox Margin="0,6,0,0" HorizontalAlignment="Left" Width="200"
                         Text="{Binding Path=Value.cpf, ElementName=ucEquipe, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"  />
            </StackPanel>
        </Grid>
        <Grid Height="53" Margin="0,0,6,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Posição Profissional" FontFamily="Segoe UI" FontSize="13.333"/>
                <ComboBox Width="180" Margin="0,6,0,0" HorizontalAlignment="Left" SelectedValue="Key" DisplayMemberPath="Value"
                          ItemsSource="{Binding Path=Value.posicaoProfissaoItems,ElementName=ucEquipe,Mode=OneWay}"
                          SelectedIndex="{Binding Path=Value.posicaoProfissional,ElementName=ucEquipe,Mode=TwoWay,Converter={StaticResource enumConverter},ConverterParameter='PosicaoProfissao',ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
            </StackPanel>
        </Grid>
        <uc:IdentificacaoPrestadorEquipe Margin="0,6,0,0" Value="{Binding Path=Value.codigoProfissional,ElementName=ucEquipe,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
        <uc:ProfissionalExecutante Margin="0,6,0,0" Value="{Binding Path=Value.identificacaoProfissional,ElementName=ucEquipe,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
    </StackPanel>
</UserControl>
